<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>
<body>
    <script>
var numWays = function(n) {
    if(n<=1){
        return 1
    }
    if(n==2){
        return 2
    }
    let re1 = 1
    let re2 = 2
    for( var i = 2 ; i<n ; i++ ){
        let t = re1
        re1 = re2
        re2 = (t+re2)%1000000007
    }
    return re2
};

n = 7
console.log(numWays(n))
    </script>
</body>
</html>